// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import HttpRequest from "@/util/HttpRequest"
import VueRouter from "vue-router";
import VueCookie from "vue-cookie";
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import echarts from 'echarts'
Vue.use(ElementUI);
Vue.use(VueRouter)
Vue.use(VueCookie)

Vue.config.productionTip = false
Vue.prototype.$http=HttpRequest;
Vue.prototype.$echarts=echarts;
/* eslint-disable no-new */
const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
}
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>',
  render: h => h(App)
})
